#ifndef _SKBITMAPWIN_H
#define _SKBITMAPWIN_H

#include <windows.h>
#include <SkBitmap.h>

class SK_API SkBitmapWin : public SkBitmap
{
public:
	SkBitmapWin() : SkBitmap(), m_hbitmap(NULL) {}
	~SkBitmapWin() { if (m_hbitmap) DeleteObject(m_hbitmap), m_hbitmap = NULL; }

	void setHBITMAP(HBITMAP hbmp) { m_hbitmap = hbmp; }
	HBITMAP getHBITMAP() { return m_hbitmap; }

	void reset() { SkBitmap::reset(); if (m_hbitmap) DeleteObject(m_hbitmap), m_hbitmap = NULL; }

private:
	HBITMAP m_hbitmap;
};

#endif // _SKBITMAPWIN_H
